﻿using System.Collections.Generic;
using MRGSP.SurveyMaster.Core.Model;

namespace MRGSP.SurveyMaster.Core.Repository
{
    public interface IRepo<T> where T : new()
    {
        T Get(long id);
        IEnumerable<T> GetAll();
        long Insert(T o);
        IEnumerable<T> GetPage(int page, int pageSize);
        int Count();
        IPageable<T> GetPageable(int page, int pageSize);
        IEnumerable<T> GetWhere(object where);
        int Delete(long id);
        int InsertNoIdentity(T o);
        int Update(T o);
        int UpdateWhatWhere(object what, object where);
        int CountWhere(object where);
    }
}